<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		table, td{
			border: 1px solid #000;
			border-collapse: collapse;
		}
	</style>
</head>
<body>
	<script>
		var table = '<table>';

		for(var i = 1; i <= 9; i++) {

			table += '<tr>';

			for(var j = 1; j <= i; j++) {

				table += "<td>"+ j + ' &times ' + i + ' = ' + (j*i) +"</td>";

			}

			table += '</tr>';
		};

		table += '</table>';

		document.write(table);
	</script>
</body>
</html>